package com.xjoyt.pay.dto;

import java.io.Serializable;
import java.util.Iterator;
import java.util.List;

public class PageResult<T> implements Serializable, Iterable<T> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -164899598296679707L;

	private long total;

	private List<T> rows;

	private List<?> footer;

	public PageResult() {

	}

	public PageResult(long total, List<T> rows) {
		this.total = total;
		this.rows = rows;
	}

	public PageResult(long total, List<T> rows, List<?> footer) {
		this.total = total;
		this.rows = rows;
		this.footer = footer;
	}

	public long getTotal() {
		return total;
	}

	public List<T> getRows() {
		return rows;
	}

	public List<?> getFooter() {
		return footer;
	}

	@Override
	public Iterator<T> iterator() {
		return rows.iterator();
	}

}
